home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 April
/
EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso
/
EARCD
/
gfx
/
board
/
rtgmv13.lha
/
goodies
/
rtggadgets
/
RTGGadgets.ad
< prev
next >
Wrap
Text File
|
1996-07-04
|
8KB
|
317 lines
TABLE OF CONTENTS
RTGGadget/RTGGDownRender
RTGGadget/RTGGHitRender
RTGGadget/RTGGUpRender
RTGGadgets/CreateRTGGadgetA
RTGGadgets/CreateRTGGList
RTGGadgets/DeleteRTGGadget
RTGGadgets/DeleteRTGGList
RTGGadgets/DrawRTGGList
RTGGadgets/RefreshRTGGList
RTGGadgets/RTGGAddIPH
RTGGadgets/RTGGCloseInput
RTGGadgets/RTGGHitTest
RTGGadgets/RTGGOpenInput
RTGGadgets/RTGGRemIPH
RTGGadget/RTGGDownRender RTGGadget/RTGGDownRender
NAME
RTGGDownRender -- Render gadget in down position
SYNOPSIS
RTGGDownRender(list, akt);
RTGGDownRender(struct RTGGlist *, struct RTGGadget *);
FUNCTION
Render gadget in down position (i.e. pointer is over gadget and
button pressed).
This function is called by RefreshRTGGList.
It can be replaced by a custom function.
INPUTS
list - pointer ot gadget list
akt - pointer to gadget
RTGGadget/RTGGHitRender RTGGadget/RTGGHitRender
NAME
RTGGHitRender -- Render gadget in hit position
SYNOPSIS
RTGGHitRender(list, akt);
RTGGHitRender(struct RTGGlist *, struct RTGGadget *);
FUNCTION
Render gadget in hit position (i.e. pointer is over gadget)
This function is called by RefreshRTGGList.
It can be replaced by a custom function.
INPUTS
list - pointer ot gadget list
akt - pointer to gadget
RTGGadget/RTGGUpRender RTGGadget/RTGGUpRender
NAME
RTGGUpRender -- Render gadget in up position
SYNOPSIS
RTGGUpRender(list, akt);
RTGGUpRender(struct RTGGlist *, struct RTGGadget *);
FUNCTION
Render gadget in down position (i.e. pointer is not over gadget).
This function is called by RefreshRTGGList.
It can be replaced by a custom function.
INPUTS
list - pointer ot gadget list
akt - pointer to gadget
RTGGadgets/CreateRTGGadgetA RTGGadgets/CreateRTGGadgetA
NAME
CreateRTGGadgetA -- Allocate and initialize an RTG Gadget
SYNOPSIS
result = CreateRTGGadgetA(list, id, tags);
int CreateRTGGadgetA(struct RTGGList, int, struct TagItem *);
FUNCTION
Create an RTG Gadget with id in list list
INPUTS
list - pointer to an RTG gadget list
id - Unique identification number of this gadget
tags - pointer to a tag list. The tagitems are as follows:
RGADT_LeftEdge Left edge of gadget (x coordinate)
RGADT_TopEdge Top edge of gadget (y coordinate)
RGADT_Width Width of gadget
RGADT_Height Height of gadget
RGADT_Flags Flags. See below.
RGADT_HitTest Custom function for hit testing
RGADT_HitRender Custom function for rendering hit gadget
RGADT_DownRender Custom function for rendering pressed gadget
RGADT_UpRender Custom function for rendering depressed gadget
RGADT_Force Force this gadet id. Error if already present
RGADT_HitPen Set the hit pen for the standard renderer
RGADT_UpPen Set up pen
RGADT_DownPen Set down pen
RGADT_Key key to activate gadget
The flags field can have the following values:
RGADF_HITHILITE The gadget is hihglited when the mouse is
positioned above it.
RESULT
The result is the gadgets id, or -1 if ther was an error.
An error also occurs if the gadget`s id was already in use while
setting the RGADT_Force tag to TRUE.
NOTE
The key to activate the gadget is the latin 1 representation, not
the rawkey code.
RTGGadgets/CreateRTGGList RTGGadgets/CreateRTGGList
NAME
CreateRTGGList -- Create and initialize RTGGList header
SYNOPSIS
GList = CreateRTGGList( screen, flags)
struct RTGGList *CreateRTGGList( struct RTGScreen *, int);
FUNCTION
Allocate RTGGList header and initialize it.
INPUTS
screen = Pointer to an initialized RTGScreen
flags = flags for this screens gadget list
RESULT
A pointer to the RTGGList structure, or zero if there was an error
RTGGadgets/DeleteRTGGadget RTGGadgets/DeleteRTGGadget
NAME
DeleteRTGGadget -- Delete an RTG gadget from the list
SYNOPSIS
id = DeleteRTGGadget(list, id);
int DeleteRTGGadget(struct RTGGList, int);
FUNCTION
Delete RTG gadget from list.
INPUTS
list - pointer to a struct RTGGList
id - identification number of the gadget to be deleted
RESULT
The result is the id of the removed gadget.
RTGGadgets/DeleteRTGGList RTGGadgets/DeleteRTGGList
NAME
DeleteRTGGList -- Delete a list of RTG gadgets
SYNOPSIS
success = DeleteRTGGList(list, force);
BOOL DeleteRTGGList(struct RTGGList *, BOOL);
FUNCTION
Delete a list of RTG gadgets, including the list header.
INPUTS
list - a pointer to the RTGGList structure to be deleted
force - a boolean flag to force the list to be deleted, even if there
are gadgets left in it.
RESULT
a boolean value of TRUE indicates successful deletion.
RTGGadgets/DrawRTGGList RTGGadgets/DrawRTGGList
NAME
DrawRTGGList -- Draw a list of RTG Gadgets in their "up" position
SYNOPSIS
DrawRTGGList(list);
DrawRTGGList(struct RTGGList *);
FUNCTION
Draw a list of RTG Gadgets in their "up" position :)
INPUTS
list - a pointer to an RTGGList structure
RESULT
RTGGadgets/RefreshRTGGList RTGGadgets/RefreshRTGGList
NAME
RefreshRTGGList -- Refresh and redraw list of gadgets
SYNOPSIS
RefreshRTGGList(list)
void RefreshRTGGList(struct RTGGList *);
FUNCTION
Refresh the state of the gadgets in list list and redraw everything.
INPUTS
list - pointer to an RTGGList
RTGGadgets/RTGGAddIPH RTGGadgets/RTGGAddIPH
NAME
RTGGAddIPH -- Add Input handler to system
SYNOPSIS
RTGGAddIPH();
void RTGGAddIPH(void);
FUNCTION
Install input handler
INPUTS
RESULT
RTGGadgets/RTGGCloseInput RTGGadgets/RTGGCloseInput
NAME
RTGGCloseInput -- Close input device
SYNOPSIS
RTGGCloseInput;
void RTGGCloseInput(void);
FUNCTION
Close input device
INPUTS
RESULT
RTGGadgets/RTGGHitTest RTGGadgets/RTGGHitTest
NAME
RTGGHitTest -- Test gadget hitbox against mouse coordinates
SYNOPSIS
RTGGHitTest(akt, x, y);
int RTGGHitTest(struct RTGGadget *, int, int);
FUNCTION
This function tests if the point given by x,y is inside the gadget`s
hit box.
This function is called automatically by RefreshRTGGList.
It can be replaced by a user-defined function for more complicated
or special cases.
INPUTS
akt - Gadget to test
x - x coordinate of test point
y - y coordinate of test point
RESULT
0 - no hit
1 - hit
NOTES
RTGGadgets/RTGGOpenInput RTGGadgets/RTGGOpenInput
NAME
RTGGOpenInput -- Open input device
SYNOPSIS
RTGGOpenInput;
void RTGGOpenInput(void);
FUNCTION
Open input device
INPUTS
RESULT
RTGGadgets/RTGGRemIPH RTGGadgets/RTGGRemIPH
NAME
RTGGRemIPH -- Remove input handler
SYNOPSIS
RTGGRemIPH();
void RTGGRemIPH(void);
FUNCTION
Install input handler
INPUTS
RESULT